import Vue from 'vue'
import Router from 'vue-router'
import MainFramework from '../components/MainFramework'
import HomePage from '../components/HomePage'
import UserList from '../components/user/UserList.vue'

Vue.use(Router)

// 系统路由
const arguRountes = [
  {
    path: '/',
    name: 'mainFramework',
    menuDesc: '系统主页',
    component: MainFramework,
    hidden: true,
    children: [
      {
        path: '/index',
        name: 'index',
        menuDesc: '首页',
        component: HomePage,
        hidden: true
      }
    ]
  }
]
// 系统管理菜单, 如果需要新增则在children中加元素
let settingRoutes = {
  path: '/setting',
  name: 'setting',
  menuDesc: '系统管理',
  component: MainFramework,
  hidden: false,
  menuIcon: 'ios-construct',
  children: [
    {
      path: '/setting/user/list',
      name: 'user-list',
      menuDesc: '用户管理',
      component: UserList,
      hidden: false
    }
  ]
}
arguRountes.push(settingRoutes);


const router = new Router({
  mode: 'history',
  routes: arguRountes
})

export default router;
